package com.glodon.paas.document.dao.domain;

import com.glodon.paas.storage.InitResult;
import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;

@Entity(value = "multiPartUploadHandle", noClassnameStored = true)
public class MultiPartUploadHandleEntity {

    public static InitResult getDto(MultiPartUploadHandleEntity e) {
        if (e == null) {
            return null;
        } else {
            InitResult d = new InitResult();
            d.setContentType(e.getContentType());
            d.setKey(e.getKey());
            d.setManifest(e.getManifest());
            d.setUploadId(e.getUploadId());
            return d;
        }
    }

    @Id
    private String revisionId;

    private String key;

    private String uploadId;

    private String manifest;

    private String contentType;

    public MultiPartUploadHandleEntity() {

    }

    public MultiPartUploadHandleEntity(String key) {
        this.key = key;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getRevisionId() {
        return revisionId;
    }

    public void setRevisionId(String revisionId) {
        this.revisionId = revisionId;
    }

    public String getUploadId() {
        return uploadId;
    }

    public void setUploadId(String uploadId) {
        this.uploadId = uploadId;
    }

    public String getManifest() {
        return manifest;
    }

    public void setManifest(String manifest) {
        this.manifest = manifest;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

}
